const Base = require("./base.js");

import cms_dynamic_circle from "../dao/cms_dynamic_circle";
module.exports = class extends Base {
  listAction() {
    var {pageNum,pageSize}=this.getParams()
    return this.success(  await cms_dynamic_circle.select().offset(pageNum*pageSize).limit(pageSize);)
   
  }
  addAction() {
    var dynamic_circle=this.getPost()
    var _dynamic_circle= new cms_dynamic_circle(dynamic_circle)
    return  this.success(await _dynamic_circle.save());
  }
  deleteAction() {
    var {id}=this.getParams()
    return this.success( await cms_dynamic_circle.remove({id}));
  }
  updateAction() {
    var {id}=this.getParams()
    var mdeol=this.params()
    return  this.success(await cms_dynamic_circle.update({id},{...mdeol}));
  }
};
